<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <title>管理员账户</title>
    <link rel="stylesheet" href="css/button.css">
    <script src="js/myJs.js"></script>
    <style type="text/css" rel="stylesheet">
        .userName{
            width: 150px;
        }
        .role{
            width: 150px;
        }
        .faculty{
            width: 200px;
        }
        .operate{
            width: 160px;
        }
        /* gridtable */
        table.grid{
            font-family: verdana, arial, sans-serif;
            font-size: 13px;
            color: #333333;
            border-width: 1px;
            border-color: #666666;
            border-collapse: collapse;
            text-align: center;
        }

        table.grid th {
            border-width: 1px;
            padding: 8px;
            border-style: solid;
            border-color: #666666;
            background-color: #dedede;
        }

        table.grid td {
            border-width: 1px;
            padding: 8px;
            border-style: solid;
            border-color: #666666;
            background-color: #ffffff;
        }


    </style>
</head>
<body>
<table align="center" class="grid">
    <tr>
        <th colspan="4">管理员账户</th>
    </tr>
    <tr>
        <th class="userName">用户名</th>
        <th class="role">管理权</th>
        <th class="faculty">所属院系</th>
        <th class="operate">操作</th>
    </tr>
    <c:forEach items="${admins}" var="ad">
    <tr>
        <td class="userName">${ad.adminName}</td>
        <td class="role">${ad.adminRole}</td>
        <td class="faculty">${ad.faculty.facultyName}</td>
        <td class="operate">
            <input class="update-but" value="修改" type="button" onclick="openWin('AdminServlet?action=editAdminUi&adminName=${ad.adminName}','修改信息',500,400,1)">
            <input class="delete-but" value="删除" type="button" onclick="window.open('AdminServlet?action=deleteAdmin&adminId=${ad.adminId}','_self')">
        </td>
    </tr>
    </c:forEach>
    <tr>
        <td colspan="4">分页</td>
    </tr>
    <tr>
        <th colspan="4">
            <a target="_"></a>
            <input class="add-but" value="添加管理员" type="button" onclick="openWin('AdminServlet?action=addAdminUi','添加管理员',500,400,0);" />
        </th>
    </tr>
</table>
</body>
</html>